home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / mcode_01 / source / general / checkdrv.s < prev    next >
Encoding:
Text File  |  1995-04-27  |  820 b   |  32 lines

  1. * Program     : Determines current drive
  2. * Author    : Stephen McNabb
  3. * Creation date : 15th February 1995
  4. * Last update    : 15th February 1995
  5. * Parameters    : None
  6. * Output    : Drive number in d0
  7. *          0 - Drive A
  8. *          1 - Drive B
  9. *          etc.
  10.  
  11. start:    jsr    cls        /clear the screen
  12.     move.w    #$19,-(sp)    /use Dgetdrv() function
  13.     trap    #1        /use gemdos
  14.     addq.l    #2,sp        /tidy up stack
  15.     move.b    d0,d1        /store a copy of drive number in d1
  16.  
  17.     move.l    #text,d0    /move address of string to d0
  18.     jsr    ptext        /and print it
  19.  
  20.     add.b    #65,d1        /convert drive number to drive letter
  21.     move.b    d1,d0        /move drive letter to d0
  22.     jsr    pchar        /and print it to screen
  23.  
  24. end:    jsr    exit        /exit from program
  25.  
  26.     include    "\SOURCE\FUNCTION.S"    /include standard functions
  27.  
  28. *** Program Data ***
  29.  
  30. text:    dc.b    'You are using drive ',0
  31.  
  32. *** End of file ***